package com.sgb.kjwl.view.ui.adapter.pick;

import android.content.Context;
import android.view.View;
import android.widget.LinearLayout;

import com.sgb.kjwl.BR;
import com.sgb.kjwl.R;
import com.swgk.core.util.PickSelectEntity;
import com.swgk.core.recyclerview.adapter.BaseRecycleAdapter;
import com.swgk.core.recyclerview.adapter.ItemViewHolder;

import java.util.List;

public class PickAddViewAdapter extends BaseRecycleAdapter<View> {

    public PickAddViewAdapter(Context context, List<View> datas, int tag) {
        super(context, tag, datas);

    }

    @Override
    public void convert(ItemViewHolder holder, final View entity) {
        holder.setBinding(BR.viewModel, entity);
        LinearLayout linearLayout = holder.getItem().findViewById(R.id.root_view_layout);
        linearLayout.removeAllViews();
        linearLayout.addView(entity);
    }
}
